home *** CD-ROM | disk | FTP | other *** search
- global vidlist, vidcount, import, grabrect, preloadlist, select, lstgoodframe, fpslist, currentfps, curscript, midipause, ginsprite, emptyframe, mytype
-
- on snap
- curscript = "snap"
- blnk = image(grabrect.width, grabrect.height, 32)
- blnk.copyPixels(import.image, grabrect, grabrect)
- if blnk <> emptyframe then
- vidcount = vidcount + 1
- vidlist[vidcount] = blnk
- if vidcount > 1 then
- if vidlist[vidcount] = vidlist[lstgoodframe] then
- vidlist[vidcount] = vidlist[lstgoodframe]
- else
- lstgoodframe = vidcount
- end if
- end if
- end if
- end
-
- on grabfinished
- curscript = "grabfin"
- member("slott").image = member("origslot").image
- if select = 0 then
- select = getselect()
- end if
- lstgoodframe = 1
- preloadlist[select] = vidlist
- vidlist = []
- vidcount = 0
- midframe = max(preloadlist[select].count / 2, 1)
- selmem = member(select, "thumbnails")
- slot = member("slot", "ui")
- thumb = preloadlist[select][midframe]
- selmem.image.copyPixels(thumb, selmem.rect, thumb.rect)
- selmem.image.copyPixels(slot, slot.rect, thumb.rect, [#ink: 36])
- fpslist[select] = currentfps
- end
-
- on getselect
- repeat with i = 1 to 24
- if [0, []] contains vidlist[i] then
- select = i
- exit repeat
- end if
- end repeat
- if select = 0 then
- select = 1
- end if
- end
-